import Main from '@/view/main'
import parentView from '@/components/parent-view'

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面不会缓存
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 * }
 */

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/resetPwd',
    name: 'resetPwd',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/login/resetPwd.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: true,
          title: '首页',
          notCache: true
        },
        component: () => import('@/view/home/home.vue')
      },
      // {
      //   path: '/ownspace_index',
      //   name: 'ownspace_index',
      //   meta: {
      //     hideInMenu: true,
      //     title: '个人中心',
      //     notCache: true
      //   },
      //   component: () => import('@/view/own-space/own-space.vue')
      // },
    ]
  },

  {
    path: '/article',
    name: 'article',
    meta: {
      icon: 'ios-albums',
      title: '音频专辑'
    },
    component: Main,
    children: [
      {
        path: 'zhuanjiguanli',
        name: 'zhuanjiguanli',
        meta: {
          icon: 'ios-folder',
          title: '专辑管理'
        },
        component: () => import('@/view/zhuanjiguanli/zhuanjiguanli.vue')
      },
      // {
      //   path: 'article-list',
      //   name: 'article-list',
      //   meta: {
      //     icon: 'ios-mic',
      //     title: '音频管理'
      //   },
      //   component: () => import('@/view/feedback/table.vue')
      // },
    ]
  },
  //lzl
  {
    path: '/dujiayouhui',
    name: 'dujiayouhui',
    meta: {
      icon: 'md-flag',
      title: '独家优惠'
    },
    component: Main,
    children: [
      {
        path: 'dujiayouhui',
        name: 'dujiayouhui',
        meta: {
          icon: 'md-flag',
          title: '独家优惠'
        },
        component: () => import('@/view/dujiayouhui/dujiayouhui.vue')
      },
    ]
  },
  {
    path: '/lunbotu',
    name: 'lunbotu',
    meta: {
      icon: 'md-flag',
      title: '轮播图'
    },
    component: Main,
    children: [
      {
        path: 'lunbotu',
        name: 'lunbotu',
        meta: {
          icon: 'md-flag',
          title: '轮播图'
        },
        component: () => import('@/view/lunbotu/lunbotu.vue')
      },
    ]
  },
  {
    path: '/xuexiziliao',
    name: 'xuexiziliao',
    meta: {
      icon: 'md-flag',
      title: '学习资料'
    },
    component: Main,
    children: [
      {
        path: 'xuexiziliao',
        name: 'xuexiziliao',
        meta: {
          icon: 'md-flag',
          title: '学习资料'
        },
        component: () => import('@/view/xuexiziliao/xuexiziliao.vue')
      },
    ]
  },
  {
    path: '/fenxiangfanxian',
    name: 'fenxiangfanxian',
    meta: {
      icon: 'md-flag',
      title: '分享返现'
    },
    component: Main,
    children: [
      {
        path: 'fenxiangfanxian',
        name: 'fenxiangfanxian',
        meta: {
          icon: 'md-flag',
          title: '分享返现'
        },
        component: () => import('@/view/fenxiangfanxian/fenxiangfanxian.vue')
      },
    ]
  },
  {
    path: '/lianxikefu',
    name: 'lianxikefu',
    meta: {
      icon: 'md-flag',
      title: '联系客服'
    },
    component: Main,
    children: [
      {
        path: 'lianxikefu',
        name: 'lianxikefu',
        meta: {
          icon: 'md-flag',
          title: '联系客服'
        },
        component: () => import('@/view/lianxikefu/lianxikefu.vue')
      },
    ]
  },
  //lzl
  // {
  //   path: '/invite',
  //   name: 'invite',
  //   meta: {
  //     icon: 'md-settings',
  //     title: '福利审核'
  //   },
  //   component: Main,
  //   children: [
  //     {
  //       path: 'invite',
  //       name: 'invite',
  //       meta: {
  //         icon: 'md-settings',
  //         title: '福利审核'
  //       },
  //       component: () => import('@/view/invite/table.vue')
  //     },
  //   ]
  // },
  // {
  //   path: '/contact',
  //   name: 'contact',
  //   meta: {
  //     icon: 'md-flag',
  //     title: '联系我们'
  //   },
  //   component: Main,
  //   children: [
  //     {
  //       path: 'contact',
  //       name: 'contact',
  //       meta: {
  //         icon: 'md-flag',
  //         title: '联系我们'
  //       },
  //       component: () => import('@/view/contact/add.vue')
  //     },
  //   ]
  // },

  {
    path: '/editor_page',
    name: 'editor_page',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/editor/index.vue')
  },


  {
    path: '/argu',
    name: 'argu',
    meta: {
      hideInMenu: true
    },
    component: Main,
    children: [
      {
        path: 'params/:id',
        name: 'params',
        meta: {
          icon: 'md-flower',
          title: '动态路由',
          notCache: true
        },
        component: () => import('@/view/argu-page/params.vue')
      },
      {
        path: 'query',
        name: 'query',
        meta: {
          icon: 'md-flower',
          title: '带参路由',
          notCache: true
        },
        component: () => import('@/view/argu-page/query.vue')
      }
    ]
  },
  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: () => import('@/view/error-page/404.vue')
  }
]
